import {defineStore} from 'pinia'
import {nextTick} from 'vue'

const storeSetup = () => {
    // 页面重新加载
    const reloadFlag = ref(true)
    const reloadPage = () => {
        reloadFlag.value = false
        nextTick(() => {
            reloadFlag.value = true
        })
    }

    return {
        reloadFlag,
        reloadPage
    }
}

export const useAppStore = defineStore('app', storeSetup, {persist: true})

